package com.wctj.api.business.common.service.impl;

import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wctj.api.base.entity.DdwxPersonalMemberInfo;
import com.wctj.api.business.common.dao.DdwxPersonalMemberInfoMapper;
import com.wctj.api.business.common.service.DdwxPersonalMemberInfoService;
import org.springframework.stereotype.Service;

@Service
public class DdwxPersonalMemberInfoServiceImpl extends ServiceImpl<DdwxPersonalMemberInfoMapper, DdwxPersonalMemberInfo> implements DdwxPersonalMemberInfoService {


    @Override
    public int existsByMemberId(String memberId) {

        return new LambdaQueryChainWrapper<>(baseMapper)
                .eq(DdwxPersonalMemberInfo::getMemberId, memberId)
                .count().intValue();
    }
}
